package com.cgg.stock.client;

import com.cgg.stock.common.pojo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Order远程服务Feign接口
 */
//@FeignClient表示该接口是一个Feign客户端接口
@FeignClient(value="order-service")
@RequestMapping("order")
public interface OrderClient {
    //对应服务的Controller的方法签名
    @GetMapping("orders/{uid}")
    public List<Order> queryByUser(@PathVariable("uid") Integer uid);

    @GetMapping("save")
    public void save();
}
